package com.example.springiocdi.Controller;

import jakarta.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
//@RequestMapping("L")
@Controller
public class LoggerController {
    private static Logger logger= LoggerFactory.getLogger(LoggerController.class);
//    @RequestMapping("/Logger")
    @PostConstruct
    public String logger(){
        logger.info("-------需要打印的日志-----------");
        return "需要的日志";
    }
}
